const btn = document.querySelector('#btnLogin')
const usernameInput = document.querySelector('#username')
const passwordInput = document.querySelector('#password')
btn.addEventListener('click', function () {
  const username = usernameInput.value
  const password = passwordInput.value
  const reslist = async () => {
    const { data: res } = await axios({
      url: 'http://ajax-api.itheima.net/api/login',
      method: 'POST',
      params: {
        username,
        password,
      },
    })
    console.log(res)
    alert(res.message + '嘿嘿嘿' + res.data.account)
  }
  reslist()
})
